<script setup>
import { computed } from 'vue'
import Header from './components/Header.vue';
import Menu from './components/Menu.vue'
import { useRouter, useRoute } from 'vue-router';
import BreadCrumb from './components/BreadCrumb.vue';

const route = useRoute()
const isLoginPage = computed(() => route.path === '/login')

</script>

<template>

  <div class="flex box">
    <div v-if="isLoginPage"><router-view></router-view></div>
    <div v-else class="flex box">
      <div class="left">
        <Menu />
      </div>
      <div class="main">
        <Header />

        <div class="main-right">
          <!-- <BreadCrumb /> -->
          <router-view></router-view>
        </div>
      </div>
    </div>
  </div>

</template>

<style scoped lang="scss">
@import './style/app.scss';

.box {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.left {
  width: 180px;
  background-color: #546de0;
}

.main {
  // display: flex;
  width: calc(100% - 180px);
  height: 100%;

  .main-right {
    width: 100%;
    margin-left: 10px;
    height: calc(100% - 80px);
    overflow-y: scroll;
  }
}
</style>


<style lang="scss">
.el-pagination {
  width: 100%;
  justify-content: center;
  margin-top: 30px;
}
</style>
